<?php
/**
 * 单页
 */
namespace App\Service;

use App\Models\EwScrapyEff;

class ScrapyEffService  extends BaseService
{

	public static function getList($params)
	{
		$where = [];
		if (property_exists($params,'add_time'))
			$where['conditions'] = 'add_time = "' . $params->add_time . '"';
		$where['order'] = 'add_time DESC';
		// $where['limit'] = $params->page_num;
		// $where['offset'] = ($params->p - 1)*$params->page_num;
		return EwScrapyEff::find($where);
	}

	public static function getInfo($id = 0)
	{
		return EwScrapyEff::findFirst($id);
	}

	public static function count()
	{
		return EwScrapyEff::count();
	}
	
}